package com.xiaolin.structure.graph.matrix;

/**
 * @ClassName MyGraphTest
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/11/17
 * @Version 1.0
 */
public class MyGraphTest {
    public static void main(String[] args) {
        MyGraph graph=new MyGraph(5);
        String[] vertexList=new String[]{"A","B","C","D","E"};
        for (int i=0;i<vertexList.length;i++){
            graph.addVertex(vertexList[i]);
        }
        System.out.println(graph.getVertexList());
        graph.insertVertex(0,2,1);
        graph.insertVertex(0,4,1);
        graph.insertVertex(0,3,1);
        graph.insertVertex(1,3,1);
        graph.insertVertex(1,4,1);
        graph.list();
        System.out.println(graph.getEdgeNumber());
        System.out.println(graph.getSize());
        System.out.println(graph.get(0));
        System.out.println(graph.getWeight(4,0));
    }
}
